<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>商品编辑</h2>
    </div>
    <div class="tab-wrap">
        <div class="tab-content">
            <form id="form" action="{:U('')}" method="post" class="form-horizontal">
                <input type="hidden" name='id' value='{$Product.id}'/>
                <div class="form-item cf">
                    <label class="item-label">商品批次<span class="check-tips">（输入商品的批次）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="sku" value="{$Product.sku}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品名称<span class="check-tips">（输入商品的名称）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="name" value="{$Product.name}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品简介<span class="check-tips">（输入商品简介）</span></label>
                    <div class="controls">
                        <label class="textarea input-large">
                            <textarea name="intro">{$Product.intro}</textarea>
                        </label>
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品橱窗图片<span class="check-tips">(商品主图尺寸建议)</span></label>
                    <div class="controls">
                        <php>
                            $picarray = $data['Product']['picarray'];
                        </php>
                        {:hook('UploadImages', array('name'=>"picarray",'value'=>"$picarray"))}
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品规格<span class="check-tips">（输入商品规格）</span></label>
                    <div class="controls">
                        <label class="textarea input-large">
                            <input type="text" class="text input-large" name="quantity" value="{$Product.quantity}">
                        </label>
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品标签<span class="check-tips">（设置商品的标签）</span></label>
                    <div class="controls">
                        <volist name="lable" id="vo">
                            <if condition='$vo.check == 1'>
                                <div><input class="ids" type="checkbox" name="tagarray[]" value="{$vo.key}" checked/>{$vo.value}</div>
                                <else />
                                <div><input class="ids" type="checkbox" name="tagarray[]" value="{$vo.key}"/>{$vo.value}</div>
                            </if>
                        </volist>
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品质量<span class="check-tips">（输入商品质量）</span></label>
                    <div class="controls">
                        <label class="textarea input-large">
                            <input type="text" class="text input-large" name="quality" value="{$Product.quality}">
                        </label>
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品产地<span class="check-tips">（输入商品的产地）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="proorigin" value="{$Product.origin}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品摆放周期<span class="check-tips">（输入商品的摆放周期）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="procycle" value="{$Product.cycle}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品存储方式<span class="check-tips">（输入商品的存储方式）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="prostorage" value="{$Product.storage}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品库存<span class="check-tips">（输入商品的库存/份）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="proinventory" value="{$Product.inventory}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">限购数量<span class="check-tips">（输入限购数量/份）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="limit_num" value="{$Product.limit_num}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品价格<span class="check-tips">（输入商品的价格）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="proprice" value="{$Product.price}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">合同价<span class="check-tips">（输入商品的合同价格）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="contract_price" value="{$Product.contract_price}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品单价<span class="check-tips">（输入商品的单价）</span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="unitprice" value="{$Product.unitprice}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品展示视频<span class="check-tips"></span></label>
                    <div class="controls">
                        <input type="text" class="text input-large" name="video" value="{$Product.video}">
                    </div>
                </div>
                <div class="form-item cf">
                    <label class="item-label">商品详情<span class="check-tips">（输入商品详情）</span></label>
                    <div class="controls">

                        {:hook('adminArticleEdit', array('name'=>'content'))}

                        <textarea name="content">{$Product.content}</textarea>
                    </div>
                </div>
                <div class="form-item cf">
                    <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal" autocomplete="off">确认保存商品编辑</button>
                </div>
            </form>
        </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
        highlight_subnav('{:U('Product/index')}');
    </script>
</block>